﻿<?php 
	require 'include/db.php';
	$rmk=$_REQUEST['rmk'];
	$cat=$_REQUEST['cat'];
	
	if($cat=="w")
	{
		$sql=mysql_query("select * from web");
	}
	if($cat=="dm")
	{
		$sql=mysql_query("select * from domain");
	}
	if($cat=="pm")
	{
		$sql=mysql_query("select * from phanmem");
	}
	if($cat=="tv")
	{
		$sql=mysql_query("select * from tuvan");
	}
	$i=1;
?>
<link type="text/css" rel="stylesheet" href="css/global.css">
<link type="text/css" rel="stylesheet" href="css/style.css">
	<div id="main" class="grid_12">
		<div id="main" class="grid_3 alpha">
			<div id="catmain1" class="grid_3 alpha" align="center">
				Dich vu		
			</div>
			<div id="catmain2" class="grid_3 alpha" >
				<img src="img/12.jpg"  style="margin-left:10px;"/> <a href="?rmk=catmain&cat=w" >
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Web&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>	
			<div id="catmain2" class="grid_3 alpha">
				<img src="img/12.jpg"   style="margin-left:10px;"/> <a href="?rmk=catmain&cat=dm" >
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hosting & Domain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>	
			</div>	
			<div id="catmain2" class="grid_3 alpha">
				<img src="img/12.jpg"   style="margin-left:10px;"/> <a href="?rmk=catmain&cat=pm" >
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phần mềm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>	
			<div id="catmain2" class="grid_3 alpha">
				<img src="img/12.jpg"   style="margin-left:10px;"/> <a href="?rmk=catmain&cat=tv" >
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tư vấn&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>		
			</div>	
			<div id="catmain6" class="grid_3 alpha">
				Dich vu		
			</div>		
		</div>
		<div class="grid_9 omega">
			<div class="grid_9" align="center"><img src="img/SLIDE.jpg" /></div>
			<div class="grid_9">
				<div class="grid_9 title" style="margin-top: 15px;">
					<?php if($cat=='w'){?><a href="?rmk=catmain&cat=w" >Web </a><?php } ?>
					<?php if($cat=='dm'){?><a href="?rmk=catmain&cat=dm" >Hosting & Domain</a><?php } ?>
					<?php if($cat=='pm'){?><a href="?rmk=catmain&cat=pm" >Phần mềm</a><?php } ?>
					<?php if($cat=='tv'){?><a href="?rmk=catmain&cat=tv" >Tư vấn</a><?php } ?>
				</div><p><br /></p>
				<?php while($row=mysql_fetch_array($sql))
				{
					{ if($i==1)
						{?>
							<div class="grid_9 cat2">
								<?php 
								if($cat=='w'){ echo substr($row['wDetail'],0,400).' . . .'; }
								if($cat=='pm'){ echo substr($row['pmDetail'],0,400).' . . .'; }
								if($cat=='dm'){ echo substr($row['dmDetail'],0,400).' . . .'; }
								if($cat=='tv'){ echo substr($row['tvDetail'],0,400).' . . .'; } 
								?>
							</div><?php 
						}
						?>
								<?php if($cat=='w')
								{?>
									<?php if ($i==2)
									{?>
										<div class="grid_2">
											<div class="grid_2 cat2">
												<a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><?php echo $row['wTitle']; ?></a>
											</div>
											<div class="grid_2 alpha" align="left">
												<a href="?rmk=catmain&cat=w&wStatus=<?php echo $row['wStatus']; ?>">
												<img src="img/small-business-opportunity.jpg" /></a>
											</div>
											<div class="grid_2">
												<?php echo substr($row['wDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}?>
									<?php if ($i==3)
									{?>
										<div class="grid_2">
											<div class="grid_2 cat2">
												<a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><?php echo $row['wTitle']; ?></a>
											</div>
											<div class="grid_2">
												<a href="?rmk=catmain&cat=w&wStatus=<?php echo $row['wStatus']; ?>">
												<img src="img/a1.jpg" /> </a>
											</div>
											<div class="grid_2">
												<?php echo substr($row['wDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}?>
									<?php if ($i==4)
									{?>	
										<div class="grid_2">	
											<div class="grid_2 cat2">
												<a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><?php echo $row['wTitle']; ?></a>
											</div>
											<div class="grid_2">
												<a href="?rmk=catmain&cat=w&wStatus=<?php echo $row['wStatus']; ?>">
												<img src="img/business_solutions634266421672187500.jpg"  /> </a>
											</div>	
											<div class="grid_2">
												<?php echo substr($row['wDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}?>
									<?php if ($i==5)
									{?>
										<div class="grid_2 omega">
											<div class="grid_2 cat2">
												<a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><?php echo $row['wTitle']; ?></a>
											</div>
											<div class="grid_2 ">
												<a href="?rmk=catmain&cat=w&wStatus=<?php echo $row['wStatus']; ?>">
												<img src="img/dich-vu-thiet-ke-website.jpg" /></a>
											</div>
											<div class="grid_2">
												<?php echo substr($row['wDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}
								}?>
								<?php if($cat=='pm')
								{?>
									<?php if ($i==2)
									{?>
										<div class="grid_4 alpha">
											<div class="grid_4 cat2">
												<a href="?rmk=catmain&cat=w&pmId=<?php echo $row['pmId']; ?>"><?php echo $row['pmTitle']; ?></a>
											</div>
											<div class="grid_4 " >
												<a href="?rmk=catmain&cat=w&pmStatus=<?php echo $row['pmStatus']; ?>">
												<img src="img/small-business-opportunity.jpg" /></a>
											</div>
											<div class="grid_4">
												<?php echo substr($row['pmDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
										
									<?php 
									}?>
									<?php if ($i==5)
									{?>
										<div class="grid_4 omega">
											<div class="grid_4 cat2">
												<a href="?rmk=catmain&cat=w&pmId=<?php echo $row['pmId']; ?>"><?php echo $row['pmTitle']; ?></a>
											</div>
											<div class="grid_4 ">
												<a href="?rmk=catmain&cat=w&pmStatus=<?php echo $row['pmStatus']; ?>">
												<img src="img/dich-vu-thiet-ke-website.jpg" /></a>
											</div>
											<div class="grid_4">
												<?php echo substr($row['pmDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}
								}?>
								<?php if($cat=='dm')
								{?>
									<?php if ($i==2)
									{?>
										<div class="grid_4 alpha">
											<div class="grid_4 cat2">
												<a href="?rmk=catmain&cat=w&dmId=<?php echo $row['dmId']; ?>"><?php echo $row['dmTitle']; ?></a>
											</div>
											<div class="grid_4 " >
												<a href="?rmk=catmain&cat=w&dmStatus=<?php echo $row['dmStatus']; ?>">
												<img src="img/small-business-opportunity.jpg" /></a>
											</div>
											<div class="grid_4">
												<?php echo substr($row['dmDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}?>
									<?php if ($i==5)
									{?>
										<div class="grid_4 omega">
											<div class="grid_4 cat2">
												<a href="?rmk=catmain&cat=w&dmId=<?php echo $row['dmId']; ?>"><?php echo $row['dmTitle']; ?></a>
											</div>
											<div class="grid_4 ">
												<a href="?rmk=catmain&cat=w&dmStatus=<?php echo $row['dmStatus']; ?>">
												<img src="img/dich-vu-thiet-ke-website.jpg" /></a>
											</div>
											<div class="grid_4">
												<?php echo substr($row['dmDetail'],0,400).' . . .'; ?><a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><img src="img/chitiet.gif" /></a>
											</div>
										</div>	
									<?php 
									}
								}?>
								<?php if($cat=='tv')
								{?>
									<?php if ($i==5)
									{?>
										<div class="grid_9 omega">
											<div class="grid_9">
												<a href="?rmk=catmain&cat=w&wId=<?php echo $row['wId']; ?>"><?php echo $row['wTitle']; ?></a>
											</div>
											<div class="grid_9 ">
												<a href="?rmk=catmain&cat=w&wStatus=<?php echo $row['wStatus']; ?>">
												<img src="img/dich-vu-thiet-ke-website.jpg" /></a>
											</div>
										</div>	
									<?php 
									}
								}?>
								
		<?php 		
				}$i++;
			} ?>
				<div class="grid_9 cat4" align="center">
					<p><br /></p>
				</div>
			</div>
		</div>
	</div>